home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / big / bibtex.tops20-changes < prev    next >
Text File  |  1988-11-08  |  6KB  |  166 lines

  1. BibTeX change file for TOPS-20, culled from Dave Fuchs's
  2. TeX change file, with his permission.
  3. Copyright (C) 1988 by Oren Patashnik.  All rights reserved.
  4.  
  5. History:
  6. January 1988---The original version of the TOPS-20 change file, for
  7.     BibTeX version 0.99a. The only substantive feature allowed
  8.     specifying the top-level .AUX file in a command line argument.
  9. February 1988---Changed for BibTeX's new version numbers, 0.99b,c.
  10.  
  11.  
  12. @x Tell WEAVE to print only the changes:
  13. \pageno=\contentspagenumber \advance\pageno by 1
  14. @y
  15. \pageno=\contentspagenumber \advance\pageno by 1
  16. \let\maybe=\iffalse
  17. \def\ttw{{\mc TOPS-20}}
  18. \def\title{\BibTeX\ changes for \ttw}
  19. @z
  20.  
  21.  
  22. @x TOPS-20's banner:
  23. @d banner=='This is BibTeX, Version 0.99c' {printed when the program starts}
  24. @y
  25. @d banner=='This is BibTeX, HUGE TOPS-20 Version 0.99c'
  26. @z
  27.  
  28.  
  29. @x    Compiler directives:
  30. @{@&$C-,A+,D-@}     {no range check, catch arithmetic overflow, no debug overhead}
  31. @!debug @{@&$C+,D+@}@+ gubed        {but turn everything on when debugging}
  32. @y    The space after the B is due to a compiler bug.
  33. @{@&$C-,A+,D-,P:520000@&B@= @>@}
  34.   {no range check, catch arithmetic overflow, no debug overhead,
  35.   move the code up to make room for the global data in production}
  36. @!debug @{@&$C+,D+,P:520000@&B@= @>@}@+ gubed
  37.   {we turn everything on when debugging}
  38. @z
  39.  
  40.  
  41. @x increase buf_size
  42. @!buf_size=1000; {maximum number of characters in an input line (or string)}
  43. @y
  44. @!buf_size=3000; {maximum number of characters in an input line (or string)}
  45. @z
  46.  
  47. @x increase pool_size
  48. @!pool_size=65000; {maximum number of characters in strings}
  49. @!max_strings=4000; {maximum number of strings, including pre-defined;
  50.                             must be |<=hash_size|}
  51. @!max_cites=750; {maximum number of distinct cite keys; must be
  52.                             |<=max_strings|}
  53. @y
  54. @!pool_size=251635; {maximum number of characters in strings}
  55. @!max_strings=15360; {maximum number of strings, including pre-defined;
  56.                             must be |<=hash_size|}
  57. @!max_cites=2880; {maximum number of distinct cite keys; must be
  58.                             |<=max_strings|}
  59. @z
  60.  
  61. @x
  62. @!max_ent_ints=3000; {maximum number of |int_entry_var|s
  63.                     (entries $\times$ |int_entry_var|s)}
  64. @!max_ent_strs=3000; {maximum number of |str_entry_var|s
  65.                     (entries $\times$ |str_entry_var|s)}
  66. @y
  67. @!max_ent_ints=11520; {maximum number of |int_entry_var|s
  68.                     (entries $\times$ |int_entry_var|s)}
  69. @!max_ent_strs=11520; {maximum number of |str_entry_var|s
  70.                     (entries $\times$ |str_entry_var|s)}
  71. @z
  72.  
  73. @x
  74. @!max_fields=17250; {maximum number of fields (entries $\times$ fields,
  75.                     about |23*max_cites| for consistency)}
  76. @y
  77. @!max_fields=66240; {maximum number of fields (entries $\times$ fields,
  78.                     about |23*max_cites| for consistency)}
  79. @z
  80.  
  81. @x Define the compile-time constant |max_rescan| for command-line processing
  82. @!lit_stk_size=100; {maximum number of literal functions on the stack}
  83. @y
  84. @!lit_stk_size=100; {maximum number of literal functions on the stack}
  85. @!max_rescan=500; {maximum length of the rescan buffer}
  86. @z
  87.  
  88. @x increase file_name_size
  89. @d hash_size=5000    {must be |>= max_strings| and |>= hash_prime|}
  90. @d hash_prime=4253    {a prime number about 85\% of |hash_size| and |>= 128|
  91.                         and |< @t$2^{14}-2^6$@>|}
  92. @d file_name_size=40    {file names shouldn't be longer than this}
  93. @y
  94. @d hash_size=19200    {must be |>= max_strings| and |>= hash_prime|}
  95. @d hash_prime=16319    {a prime number about 85\% of |hash_size| and |>= 128|
  96.                         and |< @t$2^{14}-2^6$@>|}
  97. @d file_name_size=1024    {file names shouldn't be longer than this}
  98. @z
  99.  
  100.  
  101. @x Set the command-line switch
  102. check_cmnd_line := false;            {many systems will change this}
  103. @y
  104. check_cmnd_line := true;
  105. @z
  106.  
  107.  
  108. @x
  109. @<Variables for possible command-line processing@>=
  110. @!check_cmnd_line : boolean;    {|true| if we're to check the command line}
  111. @y
  112.  
  113. @d RSCAN=@'500 {ReSCAN buffer JSYS}
  114.  
  115. @<Variables for possible command-line processing@>=
  116. @!check_cmnd_line : boolean;    {|true| if we're to check the command line}
  117. @!ac1: integer; {AC1 from Rescan}
  118. @!rescan: packed array[1..max_rescan] of char; {rescan buffer}
  119. @!rescan_len: integer; {amount of |rescan| used}
  120. @!i: integer; {temporary}
  121. @z
  122.  
  123.  
  124. @x And finally, here's the code that handles the command line argument.
  125. @<Process a possible command line@>=
  126. begin
  127. do_nothing;        {the ``default system'' doesn't use the command line}
  128. end
  129. @y
  130. \ttw\ puts the user command line into the so-called rescan buffer
  131. (actually, we have to use a real hack to see if it's a bogus Execute,
  132. Start, Continue, Debug, etc.\ command, in which case we should pretend
  133. there was no command line, since the command line that was there was
  134. not intended for \BibTeX).  We copy the command line into the input
  135. buffer, and once we've isolated the (\.{.aux} file-name) argument we
  136. copy that into the |name_of_file| array.
  137.  
  138. @<Process a possible command line@>=
  139. begin
  140. jsys(RSCAN,1,i;0;ac1); {put the command line into the |TTY| input buffer}
  141. if (i<>2) or (ac1<=0) then goto aux_not_found; {RSCAN failed, somehow}
  142. if eoln(term_in) then read_ln(term_in); {for some TOPS-20's}
  143. read(term_in,rescan:rescan_len); {read in rescan buffer}
  144. if rescan_len>max_rescan then begin
  145.   write_ln(term_out,'Command line longer than ',max_rescan:0,
  146.     ' characters, so I''m ignoring it');
  147.   read_ln(term_in); goto aux_not_found; end;
  148. @/{The following line is based upon experimentation with \ttw!}
  149. if rescan_len=ac1-2 then goto aux_not_found; {EX, ST, DEB commands}
  150. @#
  151. i:=1; while rescan[i]>' ' do incr(i); {skip command name, presumably BibTeX}@/
  152. while (i<=rescan_len) and (rescan[i]=' ') do incr(i); {skip spaces}@/
  153. if i>rescan_len then goto aux_not_found; {there was no argument}
  154. @#
  155. aux_name_length := 0;
  156. while (rescan[i]>' ') do        {copy the argument into |name_of_file|}
  157.     begin
  158.     if (aux_name_length = file_name_size) then
  159.     sam_you_made_the_file_name_too_long;
  160.     incr(aux_name_length);
  161.     name_of_file[aux_name_length] := rescan[i];
  162.     incr(i);
  163.     end;
  164. end
  165. @z
  166.